<? defined('_JEXEC') or die('Restricted access');?>
<? @style(@mediaurl.'/com_bib/css/bib.css'); ?>

<form action="<?= @route('index.php?option=com_bib&view=genres')?>" method="post" name="adminForm">

	<table class="adminlist">
		<thead>
			<tr>
				<th width="5">
					<?= @text('NUM'); ?>
				</th>
				<th width="20">
					<input type="checkbox" name="toggle" value="" onclick="checkAll(<?= count(@$genres); ?>);" />
				</th>
				<th>
					<?= @helper('grid.sort', 'Name', 'name', @$state->direction, @$state->order); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<? $i = 0; $m = 0; ?>
			<? foreach (@$genres as $genre) : ?>
			<tr class="<?php echo 'row'.$m; ?>">
				<td align="center">
					<?= $i + 1; ?>
				</td>
				<td align="center">
					<?= @helper('grid.id', $i, $genre->id); ?>
				</td>
				<td>
					<a href="<?=@route('view=genre&layout=form&id='.$genre->id)?>">
						<?= $genre->name; ?>
					</a>
				</td>		
			</tr>
			<? $i = $i + 1; $m = (1 - $m); ?>
			<? endforeach; ?>

			<? if (!count(@$genres)) : ?>
			<tr>
				<td colspan="8" align="center">
					<?= @text('No items found'); ?>
				</td>
			</tr>
			<? endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="20">
					<?= @helper('admin::com.bib.helper.paginator.pagination', @$total, @$state->offset, @$state->limit) ?>
				</td>
			</tr>
		</tfoot>
	</table>
	<input type="hidden" name="boxchecked" value="0" />
</form>